import React, { createContext } from 'react';
import logo from './logo.svg';
import store from './redux/store';
import './App.css';
import { Provider } from 'react-redux';
import Child from './components/child';
import Child2 from './components/child2';
import ClassChild from './components/class_child';
import NoRexChild from './components/no-rex-child';
import { OtherContext } from './contexts';

function App() {
  console.log('App render');
  return (
    <Provider store={store}>
      <div className="App">
        <OtherContext.Provider value={{ testName: 100 }}>
          <header className="App-header">
            <img src={logo} className="App-logo" alt="logo" />
            <Child />
            <Child2 />
            <ClassChild />
            <NoRexChild />
          </header>
        </OtherContext.Provider>
      </div>
    </Provider>
  );
}

export default App;
